import {createData, getData} from "./handleLocal";

export const initAllData = () => {
    createData('cardList',cardList)
    createData('urlList',urlList)
    createData('workSiteList',workSiteList)
    createData('todoList', todoList)
    createData('setData', setData)

}
export const isFirst = () => {
    createData('isFirst',1)
}
export const toInit = () => {
    const flag = getData('isFirst')
    return flag === 1
}
export const cardList = [
    {
        id:'1111',
        title:'React Native',
        url:`https://reactnative.cn/`,
        content:'RN中文文档'
    },
    {
        id:'2222',
        title:'React',
        url:`https://react.docschina.org/`,
        content:'React中文文档'
    },
    {
        id:'3333',
        title:'Jira',
        url:'http://jira.yijiupidev.com/secure/Dashboard.jspa',
        content:'jira个人主页'
    },
    {
        id:'4444',
        title: 'Gitee',
        url:'https://gitee.com/',
        content: '个人Gitee主页'
    },
    {
        id:'5555',
        title: 'Antd文档',
        url:'https://ant.design/components/overview-cn/',
        content:'Antd官方组件文档'
    }
]

export const urlList = [
    {
        id:'1111',
        key:1,
        url:`https://www.baidu.com/s?wd=`,
        name:'百度搜索'
    },
    {
        id:'2222',
        key:2,
        url:`https://kaifa.baidu.com/searchPage?wd=`,
        name:'开发者搜索'
    },
    {
        id:'3333',
        key:3,
        url:`https://cn.bing.com/search?q=`,
        name:'Bing'
    },
]

export const workSiteList = [
    'http://jira.yijiupidev.com/secure/Dashboard.jspa',
    'https://mail.yijiupi.com/cgi-bin/frame_html?sid=D7K5SEkwT9sZbV08,2&sign_type=&r=cbedb535c2f2e29e63535b31b0adb682',
    'http://sso.test.yijiupidev.com/detail'
]

export const todoList = [
    {
        id:'1231231',
        title:'熟悉项目',
        content:'熟悉RN的两个项目，pda和易配送'
    },
    {
        id:'2222222',
        title:'熟悉项目',
        content:'熟悉RN的两个项目，pda和易配送'
    },
    {
        id:'333333',
        title:'熟悉项目',
        content:'熟悉RN的两个项目，pda和易配送'
    }
]

export const setData = {
        username:'kas',
        tagOpenNewPage:'true'
}

